import request from '@/utils/request'

/**
 *获取组织架构的数据
 * @param {Object}  无需参数，get请求
 * @returns 请求的结果，promise对象
 */
export const getDepartMentList = () => request.get('/company/department')

// 新增部门
export const newAddDepartment = data => request.post('/company/department', data)

// 根据ID查询部门详情
export const getDepartDetailById = id => request.get(`/company/department/${id}`)

// 根据ID修改部门详情
export const editDepartDetailById = data => request.put(`/company/department/${data.id}`, data)

// 根据ID删除部门
export const delDepartDetailById = id => request.delete(`/company/department/${id}`)
